#include "startuppage.h"
#include <QLabel>
#include <QTimer>

StartupPage::StartupPage(QDialog *parent)
    : QDialog{parent}
{
    //设置无边框
    setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);

    //设置窗口大小
    setFixedSize(850,650);

    //设置背景颜色
    setStyleSheet("background-color:#FFFFFF");

    //在窗口中显示图片
    QLabel* imageLabel=new QLabel(this);
    //imageLabel->setPixmap(QPixmap(":/Image/homePage/title.png"));
    imageLabel->setPixmap(QPixmap(":/Image/startupPage/ciyou.png"));
    imageLabel->move(220,200);//默认图片是显示在左上角的，可以move移动下
}

void StartupPage::startTimer()
{
    QTimer* timer=new QTimer();
    connect(timer,&QTimer::timeout,this,[=]{
        timer->stop();
        delete timer;
        close();
    });
    timer->start(2000);
}
